        #ifndef _tiff_h_
        #define _tiff_h_

// tiff.h
//
// tiff file delegate

#include "delegates/io.h"

namespace simple{

        //
        // TIFF
        //
        // TIFF storage delegate

        class TIFFException : public Exception
        {
        public:
                TIFFException (std::string name="")
                        : Exception ("TIFFException: " + name) {}
        };


        class TIFF : public ImageIOBase
        {
        public:
                static TIFF& gOnly ();

                virtual DelegateInfo info (const std::string& filename);
                // Given data from the header of an image, return information
                // about this image, or indicate that nothing is known.

                virtual Image<RGB> readRGB     (const std::string& filename);
                virtual Image<Pel8>    readPel8    (const std::string& filename);

                virtual bool write (const std::string& filename,
                    const RectImageStorage& pixels,const DelegateParams& params = sNoParams);

                // Default copy constructor and assignment operators ok.
        private:
                static TIFF* _sOnly;

                TIFF ();
                ~TIFF ();
        };


        // This object will make sure that TIFF is added to our supported list
        // during static initialization

        class TIFF_installer
        {
        public:
                static TIFF_installer installer;
        private:
                TIFF_installer ();
        };

}
#endif // _tiff_h_
